package com.bw.base.net

import com.bw.base.entity.*
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface ApiService {
    @POST("/api/user/login")
    suspend fun login(@Query("password")password: String, @Query("username")username: String): Res<UserBean>

    @GET("/api/announcements")
    suspend fun getNotice(@Query("page")page: Int, @Query("size")size: Int): Res<NoticeBean>

    @GET("/api/news")
    suspend fun getNews(): Res<NewsBean>

    @GET("/api/news/{id}")
    suspend fun newsDetail(@Path("id")id: Int): Res<NewsDetailBean>
}